﻿<html xmlns="http://www.w3.org/1999/xhtml" lang="utf-8">
<html>   
<head>   
<title>打印代收货款清单</title>   
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">   
<!--media=print 这个属性可以在打印时有效-->   
<style media=print>   
.Noprint{display:none;}   
.PageNext{page-break-after:always;}   
</style>   
 
<style>   
.tdp   
{   
border-bottom: 1 solid #000000;   
border-left: 1 solid #000000;   
border-right: 0 solid #ffffff;   
border-top: 0 solid #ffffff;   
}   
.tabp   
{   
border-color: #000000 #000000 #000000 #000000;   
border-style: solid;   
border-top-width: 2px;   
border-right-width: 2px;   
border-bottom-width: 1px;   
border-left-width: 1px;   
}   
.NOPRINT {   
font-family: "宋体";   
font-size: 9pt;   
}   
 
</style>   
 
</head>   
 
<body > 
<div class="NOPRINT">  
<center  >   
<p>   
<OBJECT id=WebBrowser classid=CLSID:8856F961-340A-11D0-A96B-00C04FD705A2 height=0 width=0>   
</OBJECT>   
<input type=button value="打印" onclick=    window.print()>   
  &nbsp;	<INPUT TYPE="button" value="自动打印" onClick="window.external.Print(0,0);">
<input name=Button onClick=document.all.WebBrowser.ExecWB(8,1) type=button value=页面设置>   <br/>   
</p>   
<hr align="center" width="90%" size="1" noshade>   
</center>  
</div> 
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000"   style=" text-align:center;">

  <tr>
    <td colspan="10" valign="middle" style="height:40px;"><h3>代收货款清单</h3></td>
    </tr>
  <tr>
    <td colspan="10" align="left" style=" height:35px; font-size:16px;  ">包头-<?php echo $destination_site; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发货日期：<?php echo $start_time; ?>到<?php echo $end_time; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;车号：</td>
    </tr>

  <tr style=" height:35px; font-size:16px; font-weight:bold;">
    <td>运单编号</td>
    <td>发货人（手机）</td>
    <td>收货人（手机）</td>
    <td>运费</td>
    <td>中转费</td>
    <td>结算方式</td>
    <td>代收货款</td>
    <td>实际代收货款</td>    
    <td>取款人签字</td>
    <td>备注</td>
  </tr>
<?php  
	$i=$j =0;
	
	$sum_freight = 0;
	$sum_cod_fee = 0;
	$sum_actual_fee =0;
	$sum_transfer_fee = 0;
	$sum_goods_num =0;
	foreach ($shipping_list as $value){
		
	 
 ?>

      
   
  <tr style=" height:35px; font-size:16px; ">
    <td><?php echo $value['shipping_no'] ?>&nbsp;</td>     <td><?php echo $value['shipper'].'('.$value['shipper_telephone'].')';  ?>&nbsp;</td>
    <td><?php echo $value['receiver'].'('.$value['receiver_telephone'].')'; ?>&nbsp;</td>
    <td><?php echo $value['goods_num'] ?>&nbsp;</td>
    <td><?php echo $value['freight'] ?>&nbsp;</td>
 
    <td><?php echo $value['payment_mode_name'] ?>&nbsp;</td>
    <td><?php echo $value['cod_fee'] ?>&nbsp;</td>
    <td>&nbsp; </td>
    <td>&nbsp;</td>
    <td><?php echo $value['demo'] ?>&nbsp;</td>
  </tr>
  <?php 
  	$i++; 
    $j++;
	$sum_actual_fee += $value['actual_fee'];
	$sum_cod_fee += $value['cod_fee'];
	$sum_freight += $value['freight'];
	$sum_transfer_fee += $value['transfer_fee'];
	$sum_goods_num += $value['goods_num'];
	 
  ?>
  	
    <?php if ($i == 14) {
		
		echo "</table>";
		echo "<div class='PageNext'></div>"; 
		$i =0;
		?>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000"   style=" text-align:center;">

  <tr>
    <td colspan="10" valign="middle" style="height:40px;"><h3>发货清单</h3></td>
    </tr>
  <tr>
    <td colspan="10" align="left">包头-<?php echo $destination_site; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;发货日期：<?php echo $start_time; ?>到<?php echo $end_time; ?>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;车号：</td>
    </tr>

  <tr style=" height:35px; font-size:16px; font-weight:bold;">
    <td>运单编号</td>
    <td>发货人（手机）</td>
    <td>收货人（手机）</td>
 
    <td>货物名称</td>
    <td>件数</td>
    <td>结算方式</td>
    <td>代收货款</td>
    <td>实际代收货款</td>    
    <td>收货人签字</td>
    <td width="100">备注</td>
  </tr>
        
	<?php
	
    }
	?>
<?php  } ?> 

 
</table>
<table width="100%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#000000"   style=" text-align:center;">
<tr style=" height:35px; font-size:16px; ">
<td>运单数：<?php echo $j;?> ,件数合计：<?php  echo $sum_goods_num; ?>件， 运费合计：<?php echo $sum_freight;?>元,代收货款合计：<?php echo $sum_cod_fee;?>元</td>
</tr>
</table> 
</body>   
</html>  

